NAME=NtService

all=$(NAME).exe

# define objects
objs=main.obj Service.obj NtService.obj

# define complier name and link name
CC=cl
LINK=link

# define complier FLAGS
C_FLAGS = /c /W4 /nologo`

# define LINK FLAGS
LINK_FLAGS = /SUBSYSTEM:CONSOLE /MACHINE:x86 /out:$(NAME).exe /INCREMENTAL /NOLOGO
LINK_LIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib    

NtService.obj : NtService.h 
Service.obj : Service.h
main.obj : 
#.c.obj: 
  $(CC) $(C_FLAGS) $*.cpp
#  echo Building...

#Link the objects to executable file
$(NAME).exe : $(objs)
  $(LINK) $(LINK_FLAGS) $(objs)

clean:
    del *.obj *.exe *.ilk *.pdb

